import {
  defineStore
} from 'pinia';

import {
  ref
} from 'vue';


export const persitionStore = defineStore('persition', function() {
  const persitionStoreInfo = ref('')

  return {
    persitionStoreInfo
  }

}, {
  persist: {
    pick: ['persitionStoreInfo'],
    // #ifdef MP-WEIXIN
    storage: {
      // 小程序中可以使用 wx.setStorageSync 和 wx.getStorageSync
      setItem: (key, value) => wx.setStorageSync(key, value),
      getItem: (key) => wx.getStorageSync(key),
      removeItem: (key) => wx.removeStorageSync(key),
    },
    // #endif
  }
})